/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package gsoc.ogsadai.model.impl;

import gsoc.ogsadai.model.DataType;
import gsoc.ogsadai.model.ListBeginType;
import gsoc.ogsadai.model.ListEndType;
import gsoc.ogsadai.model.ModelPackage;

import javax.xml.datatype.XMLGregorianCalendar;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Data Type</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link gsoc.ogsadai.model.impl.DataTypeImpl#getString <em>String</em>}</li>
 *   <li>{@link gsoc.ogsadai.model.impl.DataTypeImpl#getCharArray <em>Char Array</em>}</li>
 *   <li>{@link gsoc.ogsadai.model.impl.DataTypeImpl#getBinary <em>Binary</em>}</li>
 *   <li>{@link gsoc.ogsadai.model.impl.DataTypeImpl#getFloat <em>Float</em>}</li>
 *   <li>{@link gsoc.ogsadai.model.impl.DataTypeImpl#getDouble <em>Double</em>}</li>
 *   <li>{@link gsoc.ogsadai.model.impl.DataTypeImpl#getInt <em>Int</em>}</li>
 *   <li>{@link gsoc.ogsadai.model.impl.DataTypeImpl#getLong <em>Long</em>}</li>
 *   <li>{@link gsoc.ogsadai.model.impl.DataTypeImpl#isBoolean <em>Boolean</em>}</li>
 *   <li>{@link gsoc.ogsadai.model.impl.DataTypeImpl#getDate <em>Date</em>}</li>
 *   <li>{@link gsoc.ogsadai.model.impl.DataTypeImpl#getListBegin <em>List Begin</em>}</li>
 *   <li>{@link gsoc.ogsadai.model.impl.DataTypeImpl#getListEnd <em>List End</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class DataTypeImpl extends EObjectImpl implements DataType {
	/**
	 * The default value of the '{@link #getString() <em>String</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getString()
	 * @generated
	 * @ordered
	 */
	protected static final String STRING_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getString() <em>String</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getString()
	 * @generated
	 * @ordered
	 */
	protected String string = STRING_EDEFAULT;

	/**
	 * The default value of the '{@link #getCharArray() <em>Char Array</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCharArray()
	 * @generated
	 * @ordered
	 */
	protected static final String CHAR_ARRAY_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getCharArray() <em>Char Array</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCharArray()
	 * @generated
	 * @ordered
	 */
	protected String charArray = CHAR_ARRAY_EDEFAULT;

	/**
	 * The default value of the '{@link #getBinary() <em>Binary</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBinary()
	 * @generated
	 * @ordered
	 */
	protected static final byte[] BINARY_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getBinary() <em>Binary</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBinary()
	 * @generated
	 * @ordered
	 */
	protected byte[] binary = BINARY_EDEFAULT;

	/**
	 * The default value of the '{@link #getFloat() <em>Float</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFloat()
	 * @generated
	 * @ordered
	 */
	protected static final float FLOAT_EDEFAULT = 0.0F;

	/**
	 * The cached value of the '{@link #getFloat() <em>Float</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFloat()
	 * @generated
	 * @ordered
	 */
	protected float float_ = FLOAT_EDEFAULT;

	/**
	 * This is true if the Float attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean floatESet;

	/**
	 * The default value of the '{@link #getDouble() <em>Double</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDouble()
	 * @generated
	 * @ordered
	 */
	protected static final double DOUBLE_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getDouble() <em>Double</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDouble()
	 * @generated
	 * @ordered
	 */
	protected double double_ = DOUBLE_EDEFAULT;

	/**
	 * This is true if the Double attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean doubleESet;

	/**
	 * The default value of the '{@link #getInt() <em>Int</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getInt()
	 * @generated
	 * @ordered
	 */
	protected static final int INT_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getInt() <em>Int</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getInt()
	 * @generated
	 * @ordered
	 */
	protected int int_ = INT_EDEFAULT;

	/**
	 * This is true if the Int attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean intESet;

	/**
	 * The default value of the '{@link #getLong() <em>Long</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLong()
	 * @generated
	 * @ordered
	 */
	protected static final long LONG_EDEFAULT = 0L;

	/**
	 * The cached value of the '{@link #getLong() <em>Long</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLong()
	 * @generated
	 * @ordered
	 */
	protected long long_ = LONG_EDEFAULT;

	/**
	 * This is true if the Long attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean longESet;

	/**
	 * The default value of the '{@link #isBoolean() <em>Boolean</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isBoolean()
	 * @generated
	 * @ordered
	 */
	protected static final boolean BOOLEAN_EDEFAULT = false;

	/**
	 * The cached value of the '{@link #isBoolean() <em>Boolean</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isBoolean()
	 * @generated
	 * @ordered
	 */
	protected boolean boolean_ = BOOLEAN_EDEFAULT;

	/**
	 * This is true if the Boolean attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean booleanESet;

	/**
	 * The default value of the '{@link #getDate() <em>Date</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDate()
	 * @generated
	 * @ordered
	 */
	protected static final XMLGregorianCalendar DATE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getDate() <em>Date</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDate()
	 * @generated
	 * @ordered
	 */
	protected XMLGregorianCalendar date = DATE_EDEFAULT;

	/**
	 * The cached value of the '{@link #getListBegin() <em>List Begin</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getListBegin()
	 * @generated
	 * @ordered
	 */
	protected ListBeginType listBegin;

	/**
	 * The cached value of the '{@link #getListEnd() <em>List End</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getListEnd()
	 * @generated
	 * @ordered
	 */
	protected ListEndType listEnd;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected DataTypeImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return ModelPackage.Literals.DATA_TYPE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getString() {
		return string;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setString(String newString) {
		String oldString = string;
		string = newString;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__STRING, oldString, string));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getCharArray() {
		return charArray;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCharArray(String newCharArray) {
		String oldCharArray = charArray;
		charArray = newCharArray;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__CHAR_ARRAY, oldCharArray, charArray));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public byte[] getBinary() {
		return binary;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setBinary(byte[] newBinary) {
		byte[] oldBinary = binary;
		binary = newBinary;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__BINARY, oldBinary, binary));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public float getFloat() {
		return float_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setFloat(float newFloat) {
		float oldFloat = float_;
		float_ = newFloat;
		boolean oldFloatESet = floatESet;
		floatESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__FLOAT, oldFloat, float_, !oldFloatESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetFloat() {
		float oldFloat = float_;
		boolean oldFloatESet = floatESet;
		float_ = FLOAT_EDEFAULT;
		floatESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackage.DATA_TYPE__FLOAT, oldFloat, FLOAT_EDEFAULT, oldFloatESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetFloat() {
		return floatESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public double getDouble() {
		return double_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setDouble(double newDouble) {
		double oldDouble = double_;
		double_ = newDouble;
		boolean oldDoubleESet = doubleESet;
		doubleESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__DOUBLE, oldDouble, double_, !oldDoubleESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetDouble() {
		double oldDouble = double_;
		boolean oldDoubleESet = doubleESet;
		double_ = DOUBLE_EDEFAULT;
		doubleESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackage.DATA_TYPE__DOUBLE, oldDouble, DOUBLE_EDEFAULT, oldDoubleESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetDouble() {
		return doubleESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getInt() {
		return int_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setInt(int newInt) {
		int oldInt = int_;
		int_ = newInt;
		boolean oldIntESet = intESet;
		intESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__INT, oldInt, int_, !oldIntESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetInt() {
		int oldInt = int_;
		boolean oldIntESet = intESet;
		int_ = INT_EDEFAULT;
		intESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackage.DATA_TYPE__INT, oldInt, INT_EDEFAULT, oldIntESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetInt() {
		return intESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public long getLong() {
		return long_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLong(long newLong) {
		long oldLong = long_;
		long_ = newLong;
		boolean oldLongESet = longESet;
		longESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__LONG, oldLong, long_, !oldLongESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetLong() {
		long oldLong = long_;
		boolean oldLongESet = longESet;
		long_ = LONG_EDEFAULT;
		longESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackage.DATA_TYPE__LONG, oldLong, LONG_EDEFAULT, oldLongESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetLong() {
		return longESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isBoolean() {
		return boolean_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setBoolean(boolean newBoolean) {
		boolean oldBoolean = boolean_;
		boolean_ = newBoolean;
		boolean oldBooleanESet = booleanESet;
		booleanESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__BOOLEAN, oldBoolean, boolean_, !oldBooleanESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetBoolean() {
		boolean oldBoolean = boolean_;
		boolean oldBooleanESet = booleanESet;
		boolean_ = BOOLEAN_EDEFAULT;
		booleanESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackage.DATA_TYPE__BOOLEAN, oldBoolean, BOOLEAN_EDEFAULT, oldBooleanESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetBoolean() {
		return booleanESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public XMLGregorianCalendar getDate() {
		return date;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setDate(XMLGregorianCalendar newDate) {
		XMLGregorianCalendar oldDate = date;
		date = newDate;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__DATE, oldDate, date));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ListBeginType getListBegin() {
		return listBegin;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetListBegin(ListBeginType newListBegin, NotificationChain msgs) {
		ListBeginType oldListBegin = listBegin;
		listBegin = newListBegin;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__LIST_BEGIN, oldListBegin, newListBegin);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setListBegin(ListBeginType newListBegin) {
		if (newListBegin != listBegin) {
			NotificationChain msgs = null;
			if (listBegin != null)
				msgs = ((InternalEObject)listBegin).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.DATA_TYPE__LIST_BEGIN, null, msgs);
			if (newListBegin != null)
				msgs = ((InternalEObject)newListBegin).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.DATA_TYPE__LIST_BEGIN, null, msgs);
			msgs = basicSetListBegin(newListBegin, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__LIST_BEGIN, newListBegin, newListBegin));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ListEndType getListEnd() {
		return listEnd;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetListEnd(ListEndType newListEnd, NotificationChain msgs) {
		ListEndType oldListEnd = listEnd;
		listEnd = newListEnd;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__LIST_END, oldListEnd, newListEnd);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setListEnd(ListEndType newListEnd) {
		if (newListEnd != listEnd) {
			NotificationChain msgs = null;
			if (listEnd != null)
				msgs = ((InternalEObject)listEnd).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.DATA_TYPE__LIST_END, null, msgs);
			if (newListEnd != null)
				msgs = ((InternalEObject)newListEnd).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.DATA_TYPE__LIST_END, null, msgs);
			msgs = basicSetListEnd(newListEnd, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DATA_TYPE__LIST_END, newListEnd, newListEnd));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case ModelPackage.DATA_TYPE__LIST_BEGIN:
				return basicSetListBegin(null, msgs);
			case ModelPackage.DATA_TYPE__LIST_END:
				return basicSetListEnd(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case ModelPackage.DATA_TYPE__STRING:
				return getString();
			case ModelPackage.DATA_TYPE__CHAR_ARRAY:
				return getCharArray();
			case ModelPackage.DATA_TYPE__BINARY:
				return getBinary();
			case ModelPackage.DATA_TYPE__FLOAT:
				return new Float(getFloat());
			case ModelPackage.DATA_TYPE__DOUBLE:
				return new Double(getDouble());
			case ModelPackage.DATA_TYPE__INT:
				return new Integer(getInt());
			case ModelPackage.DATA_TYPE__LONG:
				return new Long(getLong());
			case ModelPackage.DATA_TYPE__BOOLEAN:
				return isBoolean() ? Boolean.TRUE : Boolean.FALSE;
			case ModelPackage.DATA_TYPE__DATE:
				return getDate();
			case ModelPackage.DATA_TYPE__LIST_BEGIN:
				return getListBegin();
			case ModelPackage.DATA_TYPE__LIST_END:
				return getListEnd();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case ModelPackage.DATA_TYPE__STRING:
				setString((String)newValue);
				return;
			case ModelPackage.DATA_TYPE__CHAR_ARRAY:
				setCharArray((String)newValue);
				return;
			case ModelPackage.DATA_TYPE__BINARY:
				setBinary((byte[])newValue);
				return;
			case ModelPackage.DATA_TYPE__FLOAT:
				setFloat(((Float)newValue).floatValue());
				return;
			case ModelPackage.DATA_TYPE__DOUBLE:
				setDouble(((Double)newValue).doubleValue());
				return;
			case ModelPackage.DATA_TYPE__INT:
				setInt(((Integer)newValue).intValue());
				return;
			case ModelPackage.DATA_TYPE__LONG:
				setLong(((Long)newValue).longValue());
				return;
			case ModelPackage.DATA_TYPE__BOOLEAN:
				setBoolean(((Boolean)newValue).booleanValue());
				return;
			case ModelPackage.DATA_TYPE__DATE:
				setDate((XMLGregorianCalendar)newValue);
				return;
			case ModelPackage.DATA_TYPE__LIST_BEGIN:
				setListBegin((ListBeginType)newValue);
				return;
			case ModelPackage.DATA_TYPE__LIST_END:
				setListEnd((ListEndType)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case ModelPackage.DATA_TYPE__STRING:
				setString(STRING_EDEFAULT);
				return;
			case ModelPackage.DATA_TYPE__CHAR_ARRAY:
				setCharArray(CHAR_ARRAY_EDEFAULT);
				return;
			case ModelPackage.DATA_TYPE__BINARY:
				setBinary(BINARY_EDEFAULT);
				return;
			case ModelPackage.DATA_TYPE__FLOAT:
				unsetFloat();
				return;
			case ModelPackage.DATA_TYPE__DOUBLE:
				unsetDouble();
				return;
			case ModelPackage.DATA_TYPE__INT:
				unsetInt();
				return;
			case ModelPackage.DATA_TYPE__LONG:
				unsetLong();
				return;
			case ModelPackage.DATA_TYPE__BOOLEAN:
				unsetBoolean();
				return;
			case ModelPackage.DATA_TYPE__DATE:
				setDate(DATE_EDEFAULT);
				return;
			case ModelPackage.DATA_TYPE__LIST_BEGIN:
				setListBegin((ListBeginType)null);
				return;
			case ModelPackage.DATA_TYPE__LIST_END:
				setListEnd((ListEndType)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case ModelPackage.DATA_TYPE__STRING:
				return STRING_EDEFAULT == null ? string != null : !STRING_EDEFAULT.equals(string);
			case ModelPackage.DATA_TYPE__CHAR_ARRAY:
				return CHAR_ARRAY_EDEFAULT == null ? charArray != null : !CHAR_ARRAY_EDEFAULT.equals(charArray);
			case ModelPackage.DATA_TYPE__BINARY:
				return BINARY_EDEFAULT == null ? binary != null : !BINARY_EDEFAULT.equals(binary);
			case ModelPackage.DATA_TYPE__FLOAT:
				return isSetFloat();
			case ModelPackage.DATA_TYPE__DOUBLE:
				return isSetDouble();
			case ModelPackage.DATA_TYPE__INT:
				return isSetInt();
			case ModelPackage.DATA_TYPE__LONG:
				return isSetLong();
			case ModelPackage.DATA_TYPE__BOOLEAN:
				return isSetBoolean();
			case ModelPackage.DATA_TYPE__DATE:
				return DATE_EDEFAULT == null ? date != null : !DATE_EDEFAULT.equals(date);
			case ModelPackage.DATA_TYPE__LIST_BEGIN:
				return listBegin != null;
			case ModelPackage.DATA_TYPE__LIST_END:
				return listEnd != null;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (string: ");
		result.append(string);
		result.append(", charArray: ");
		result.append(charArray);
		result.append(", binary: ");
		result.append(binary);
		result.append(", float: ");
		if (floatESet) result.append(float_); else result.append("<unset>");
		result.append(", double: ");
		if (doubleESet) result.append(double_); else result.append("<unset>");
		result.append(", int: ");
		if (intESet) result.append(int_); else result.append("<unset>");
		result.append(", long: ");
		if (longESet) result.append(long_); else result.append("<unset>");
		result.append(", boolean: ");
		if (booleanESet) result.append(boolean_); else result.append("<unset>");
		result.append(", date: ");
		result.append(date);
		result.append(')');
		return result.toString();
	}

} //DataTypeImpl
